<?php

namespace App\Console\Commands;

use App\Interfaces\WorkshopInterFace;
use App\model\admin\Workshop;
use Illuminate\Console\Command;
use function foo\func;

class RemoveWorkshopStyle extends Command
{
    /**
     * The name and signature of the console command.
     *
     * @var string
     */
    protected $signature = 'workshop:remove';

    /**
     * The console command description.
     *
     * @var string
     */
    protected $description = 'Command description';
    protected $workshopInterFace;
    /**
     * Create a new command instance.
     *
     * @return void
     */
    public function __construct(WorkshopInterFace $workshopInterFace)
    {
        parent::__construct();
        $this->workshopInterFace=$workshopInterFace;
    }

    /**
     * Execute the console command.
     *
     * @return mixed
     */
    public function handle()
    {
        Workshop::chunk(100,function ($workshop){
            foreach ($workshop as $item){
                $this->workshopInterFace->removeWorkshopDescStyle($item);
            }

        });
    }
}
